using System.Runtime.InteropServices;
using System;

namespace Recast
{
	public unsafe partial class RecastGlobal
	{
		[StructLayout(LayoutKind.Sequential)]
		public unsafe partial struct rcSpanPool : IDisposable
		{
			public rcSpanPool* next;
			public rcSpan* items;// [RC_SPANS_PER_POOL];

			public rcSpanPool(byte tag) : this()
			{
				items = rcNewArray<rcSpan>(RC_SPANS_PER_POOL, rcAllocHint.RC_ALLOC_PERM);
			}

			public void Dispose()
			{
				rcDelete(items);
			}
		}
	}
}
